﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using ClassLibrary.DAO;

public partial class Karaoke_UcControl_Uckaraoke : System.Web.UI.UserControl
{

    TblMenuDAO menuDAO = new TblMenuDAO(Global.CONNECTION_STRING);

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            LoadMenuYumCha();
        }

    }
    private void LoadMenuYumCha()
    {
        try
        {
            lvKaraoke.DataSource = menuDAO.GetMenu_Wedding(4);
            lvKaraoke.DataBind();
        }
        catch (Exception ex)
        {
            Session[Global.SESSION_ERROR] = ex;
            Response.Redirect("~/Wedding/Error.aspx", true);
        }
    }
    protected void lvKaraoke_ItemDataBound(object sender, ListViewItemEventArgs e)
    {
        if (e.Item.ItemType == ListViewItemType.DataItem)
        {
            // Display the e-mail address in italics.
            Label lb_Price = (Label)e.Item.FindControl("lbPrice");

            DataTable dt = null;
            dt = menuDAO.GetMenu_Wedding(1);

            lb_Price.Text = "$";
            lb_Price.Font.Size = 20;
          



        }
    }
    protected void lvKaraoke_PagePropertiesChanged(object sender, EventArgs e)
    {

    }
}
